import http from './ajaxHelp'

export default {
  home: {
    getData (lang: string) {
      return http.get(`/web/common/home?lang=${lang}`)
    },
    // getBg () {
    //   return http.get('/web/common/home')
    // },
    getMenuList (lang: string) {
      return http.get(`/web/common/navigationBar?lang=${lang}`)
    },
    getModuleData (params: any) {
      return http.get(`/web/common/page/details?id=${params.id}&lang=${params.lang}`)
    },
    getBusinessDetail (params: any) {
      return http.get(`/web/common/businessScope/details?id=${params.id}&lang=${params.lang}`)
    }
  },
  news: {
    getList (params: any) {
      return http.get(`/web/news/pageList?lang=${params.lang}&createdAt=${params.createdAt ? params.createdAt : ''}&owner=${params.owner}&page=${params.page}&pageSize=${params.pageSize}&title=${params.title}`)
    },
    getDetail (id: string) {
      return http.get(`/web/news/detail/${id}`)
    }
  },
  concat: {
    getAddress (lang: string) {
      return http.get(`/web/address/list?lang=${lang}`)
    },
    getJobList (params: any) {
      return http.get(`/web/jobs/pageList?lang=${params.lang}&name=${params.name}&businessGroup=${params.businessGroup}&city=${params.city}&country=${params.country}&employmentType=${params.employmentType}&type=${params.type}&pageSize=${params.pageSize}&page=${params.page}&`)
    },
    getJobDetail (id: string) {
      return http.get(`/web/jobs/detail/${id}`)
    },
    submitCoop (params: any) {
      return http.post('/web/cooperation/submit', params)
    }
  }
}
